package com.buba.mapper;

import com.alipay.api.domain.UserVo;
import entity.FollowTopicEntity;
import entity.FollowUserEntiry;
import entity.User;
import entity.VO.FollowUserVO;
import entity.VO.UserVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: 孔德嘉
 * @Description: TODO
 * @DateTime: 2023/3/6 19:49
 **/
@Mapper
public interface FollowUserMapper {
    /*
     * @param id
     * @return result.CommonResult
     * @author kdj
     * @describe:查询关注人的发布的日记话题
     * @date 2023/3/6 19:46
     */
    List<FollowUserVO> getFollowUserIndexList(int id);

    /*
    * @param id
    * @return java.util.List<entity.User>
    * @author kdj
    * @describe:根据id找到关注的用户信息
    * @date 2023/3/7 8:17
    */
    List<UserVO> getFollowUserInformation(int id);

    /*
     * @param topicId 话题id
     * @param userId 用户id
     * @return entity.FollowUserEntiry
     * @author kdj
     * @describe:查询该用户是否关注过该用户
     * @date 2023/3/9 12:01
     */
    FollowUserEntiry getFollowByUserId(@Param("coverUserId") int coverUserId, @Param("userId") int userId);

    /*
     * @param followUserEntiry
     * @return int
     * @author kdj
     * @describe:修改关注用户状态
     * @date 2023/3/9 12:05
     */
    int upFollowStatus(FollowUserEntiry followUserEntiry);

    /*
     * @param followUserEntiry
     * @return int
     * @author kdj
     * @describe:添加关注用户数据
     * @date 2023/3/9 12:05
     */
    int addFollowUser(FollowUserEntiry followUserEntiry);
}
